//
//  MyAccountDetailView.m
//  iFlower
//
//  Created by Tho Hoang on 11/3/10.
//  Copyright 2010 iNIL.me. All rights reserved.
//

#import "MyAccountDetailView.h"
#import "Address.h"


@implementation MyAccountDetailView

-(IBAction)backAction:(id)sender
{
	[self.navigationController popViewControllerAnimated:YES];
}


/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        // Custom initialization
    }
    return self;
}
*/


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
	
	self._label.text = self.address.label;
	self._firstName.text = self.address.firstName;
	self._lastName.text = self.address.lastName;
	self._address.text = self.address.addressLine1;
	self._address2.text = self.address.addressLine2;
	self._phone.text = self.address.phone;
	self._fax.text = self.address.fax;
	self._city.text = self.address.city;
	self._state.text = self.address.state;
	self._country.text = self.address.country;
	self._zip.text = self.address.zipCode;
}


/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
	
}


- (void)dealloc {
    [super dealloc];
	[self.address release];
	[self._label release];
	[self._firstName release];
	[self._lastName release];
	[self._address release];
	[self._address2 release];
	[self._phone release];
	[self._fax release];
	[self._city release];
	[self._state release];
	[self._country release];
	[self._zip release];
}


@end
